<?php include "includes/comunes.php";
$titulo="Licitaciones";
$where="";

if($_POST['nro'])
  $where.= " and LicitacionNumero='".strtoupper(trim($_POST['nro']))."'";
  
if($_POST['tip'])
  $where.= " and LicitacionTipo='".strtoupper(trim($_POST['tip']))."'";
  
if($_POST['ano'])
  $where.= " and LicitacionAno=".strtoupper(trim($_POST['ano']));
  
if($_POST['lic'])
  $where.= " and LicitacionTitulo like '%".strtoupper(trim($_POST['lic']))."%'";  

$tabla="licitaciones";
$condicion=" LicitacionesPublicar=1 ".$where;
$orden=" order by LicitacionNumero desc,LicitacionAno desc limit 0,40";
$res=cons_sql($tabla,$condicion,$orden);

//seteo titulo de la pagina

 ?>
<html class="no-js"> <!--<![endif]-->
<head>
      <?php include "includes/metas.php";?>
    </head>
<body>

 <?php include "includes/nav.php";?>
 <?php include "includes/header.php";?>    
 <?php include "includes/menu.php";?>  

<div class="container">
<div class="row">
</div>
</div>

<div class="space"></div>
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="art"><h3><div class="destaca">Licitaciones</div></h3>
<div class="row">
<div class="col-md-8 col-sm-8">

 <a href="licitaciones.php">Ver Todas</a>

 <br>
 <br>

</div>

</div>
<div class="row">
<div class="col-md-8 col-sm-8">
<?php while($reg=mysql_fetch_array($res)):?>
<h4><b><a href="detalleLicitaciones.php?lic=<?php echo utf8_encode($reg['LicitacionesId'])?>&tit=<?php echo utf8_encode($reg['LicitacionTitulo'])?>"><?php echo utf8_encode($reg['LicitacionTitulo'])?></a> </b></h4>
 <?php echo utf8_encode(obtener_tipo_licita($reg['LicitacionTipo'])).' Nro: '.utf8_encode($reg['LicitacionNumero']).'-'.utf8_encode($reg['LicitacionAno'])?> |  Apertura: <?php echo format_fec($reg['LicitacionesFechaApertura'],'.')?>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a>Estado: <?php echo utf8_encode($reg['LicitacionesEstado'])?></a>
<hr>
<?php endwhile?>

</div>
<div class="col-md-4 col-sm-4">
<form role="search" method="POST" action="licitaciones.php">

<div class="form-group">
	 <input type="text" class="form-control" name="lic" placeholder="Licitacion" ><br>
	 <select class="form-control" name="tip">
	 <option value="0">Seleccionar...</option>
	 <option value="1">Publica</option>
	 <option value="2">Privada</option>
	 <option value="3">Concurso de Precios</option>
	 </select><br>
	<input type="text" class="form-control" name="nro" placeholder="Numero" style="width:40%"> <br>
	<input type="text" class="form-control" name="ano" placeholder="Año" style="width:60%"> 
 </div>
 <button type="submit" class="btn btn-default">Buscar</button>
  
</form>





</div>
 </div>


<a href="index.php"><button type="button" class="btn btn-default btn-sm">Inicio</button></a></div>
</div></div>
<div class="linea"></div>
<?php include "includes/menuInferior.php";?> 
<div class="linea"></div>
<?php include "includes/footer.php";?> 

 <?php include "includes/js.php";?>  
    </body>
</html>
